package com.example.weather.utils

import android.util.Log
import com.google.gson.Gson

object Logger {
    private const val TAG = "QWeather"
    private val gson = Gson()

    fun logResponse(
        response: Any?,
        tag: String = TAG,
        message: String = "",
        isDebug: Boolean = true
    ) {
        if (isDebug) {
            val json = gson.toJson(response)
            Log.d(tag, "$message\nJSON: $json")
        }
    }

    fun i(tag: String = TAG, message: String = "") {
        Log.d(tag, message)
    }
}
